//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension Resiliencehub {
    // MARK: Enums

    public enum AlarmType: String, CustomStringConvertible, Codable, _SotoSendable {
        case canary = "Canary"
        case composite = "Composite"
        case event = "Event"
        case logs = "Logs"
        case metric = "Metric"
        public var description: String { return self.rawValue }
    }

    public enum AppAssessmentScheduleType: String, CustomStringConvertible, Codable, _SotoSendable {
        case daily = "Daily"
        case disabled = "Disabled"
        public var description: String { return self.rawValue }
    }

    public enum AppComplianceStatusType: String, CustomStringConvertible, Codable, _SotoSendable {
        case changesDetected = "ChangesDetected"
        case notAssessed = "NotAssessed"
        case policyBreached = "PolicyBreached"
        case policyMet = "PolicyMet"
        public var description: String { return self.rawValue }
    }

    public enum AppStatusType: String, CustomStringConvertible, Codable, _SotoSendable {
        case active = "Active"
        case deleting = "Deleting"
        public var description: String { return self.rawValue }
    }

    public enum AssessmentInvoker: String, CustomStringConvertible, Codable, _SotoSendable {
        case system = "System"
        case user = "User"
        public var description: String { return self.rawValue }
    }

    public enum AssessmentStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case failed = "Failed"
        case inProgress = "InProgress"
        case pending = "Pending"
        case success = "Success"
        public var description: String { return self.rawValue }
    }

    public enum ComplianceStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case policyBreached = "PolicyBreached"
        case policyMet = "PolicyMet"
        public var description: String { return self.rawValue }
    }

    public enum ConfigRecommendationOptimizationType: String, CustomStringConvertible, Codable, _SotoSendable {
        case bestAZRecovery = "BestAZRecovery"
        case bestAttainable = "BestAttainable"
        case bestRegionRecovery = "BestRegionRecovery"
        case leastChange = "LeastChange"
        case leastCost = "LeastCost"
        case leastErrors = "LeastErrors"
        public var description: String { return self.rawValue }
    }

    public enum CostFrequency: String, CustomStringConvertible, Codable, _SotoSendable {
        case daily = "Daily"
        case hourly = "Hourly"
        case monthly = "Monthly"
        case yearly = "Yearly"
        public var description: String { return self.rawValue }
    }

    public enum DataLocationConstraint: String, CustomStringConvertible, Codable, _SotoSendable {
        case anyLocation = "AnyLocation"
        case sameContinent = "SameContinent"
        case sameCountry = "SameCountry"
        public var description: String { return self.rawValue }
    }

    public enum DisruptionType: String, CustomStringConvertible, Codable, _SotoSendable {
        case az = "AZ"
        case hardware = "Hardware"
        case region = "Region"
        case software = "Software"
        public var description: String { return self.rawValue }
    }

    public enum EstimatedCostTier: String, CustomStringConvertible, Codable, _SotoSendable {
        case l1 = "L1"
        case l2 = "L2"
        case l3 = "L3"
        case l4 = "L4"
        public var description: String { return self.rawValue }
    }

    public enum HaArchitecture: String, CustomStringConvertible, Codable, _SotoSendable {
        case backupAndRestore = "BackupAndRestore"
        case multiSite = "MultiSite"
        case noRecoveryPlan = "NoRecoveryPlan"
        case pilotLight = "PilotLight"
        case warmStandby = "WarmStandby"
        public var description: String { return self.rawValue }
    }

    public enum PhysicalIdentifierType: String, CustomStringConvertible, Codable, _SotoSendable {
        case arn = "Arn"
        case native = "Native"
        public var description: String { return self.rawValue }
    }

    public enum RecommendationComplianceStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case breachedCanMeet = "BreachedCanMeet"
        case breachedUnattainable = "BreachedUnattainable"
        case metCanImprove = "MetCanImprove"
        public var description: String { return self.rawValue }
    }

    public enum RecommendationTemplateStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case failed = "Failed"
        case inProgress = "InProgress"
        case pending = "Pending"
        case success = "Success"
        public var description: String { return self.rawValue }
    }

    public enum RenderRecommendationType: String, CustomStringConvertible, Codable, _SotoSendable {
        case alarm = "Alarm"
        case sop = "Sop"
        case test = "Test"
        public var description: String { return self.rawValue }
    }

    public enum ResiliencyPolicyTier: String, CustomStringConvertible, Codable, _SotoSendable {
        case coreServices = "CoreServices"
        case critical = "Critical"
        case important = "Important"
        case missionCritical = "MissionCritical"
        case nonCritical = "NonCritical"
        public var description: String { return self.rawValue }
    }

    public enum ResourceImportStatusType: String, CustomStringConvertible, Codable, _SotoSendable {
        case failed = "Failed"
        case inProgress = "InProgress"
        case pending = "Pending"
        case success = "Success"
        public var description: String { return self.rawValue }
    }

    public enum ResourceMappingType: String, CustomStringConvertible, Codable, _SotoSendable {
        case appRegistryApp = "AppRegistryApp"
        case cfnStack = "CfnStack"
        case resource = "Resource"
        case resourceGroup = "ResourceGroup"
        case terraform = "Terraform"
        public var description: String { return self.rawValue }
    }

    public enum ResourceResolutionStatusType: String, CustomStringConvertible, Codable, _SotoSendable {
        case failed = "Failed"
        case inProgress = "InProgress"
        case pending = "Pending"
        case success = "Success"
        public var description: String { return self.rawValue }
    }

    public enum SopServiceType: String, CustomStringConvertible, Codable, _SotoSendable {
        case ssm = "SSM"
        public var description: String { return self.rawValue }
    }

    public enum TemplateFormat: String, CustomStringConvertible, Codable, _SotoSendable {
        case cfnJson = "CfnJson"
        case cfnYaml = "CfnYaml"
        public var description: String { return self.rawValue }
    }

    public enum TestRisk: String, CustomStringConvertible, Codable, _SotoSendable {
        case high = "High"
        case medium = "Medium"
        case small = "Small"
        public var description: String { return self.rawValue }
    }

    public enum TestType: String, CustomStringConvertible, Codable, _SotoSendable {
        case az = "AZ"
        case hardware = "Hardware"
        case region = "Region"
        case software = "Software"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AddDraftAppVersionResourceMappingsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        ///  Mappings used to map logical resources from the template to physical resources. You can use the mapping type CFN_STACK if the application template uses a logical stack name. Or you can map individual resources by using the mapping type RESOURCE. We recommend using the mapping type CFN_STACK if the application is backed by a CloudFormation stack.
        public let resourceMappings: [ResourceMapping]

        public init(appArn: String, resourceMappings: [ResourceMapping]) {
            self.appArn = appArn
            self.resourceMappings = resourceMappings
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.resourceMappings.forEach {
                try $0.validate(name: "\(name).resourceMappings[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case resourceMappings
        }
    }

    public struct AddDraftAppVersionResourceMappingsResponse: AWSDecodableShape {
        ///  The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String
        /// Mappings used to map logical resources from the template to physical resources. You can use the mapping type CFN_STACK if the application template uses a logical stack name. Or you can map individual resources by using the mapping type RESOURCE. We recommend using the mapping type CFN_STACK if the application is backed by a CloudFormation stack.
        public let resourceMappings: [ResourceMapping]

        public init(appArn: String, appVersion: String, resourceMappings: [ResourceMapping]) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.resourceMappings = resourceMappings
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case resourceMappings
        }
    }

    public struct AlarmRecommendation: AWSDecodableShape {
        /// The application component for the CloudWatch alarm recommendation.
        public let appComponentName: String?
        /// The description of the recommendation.
        public let description: String?
        /// The list of CloudWatch alarm recommendations.
        public let items: [RecommendationItem]?
        /// The name of the alarm recommendation.
        public let name: String
        /// The prerequisite for the alarm recommendation.
        public let prerequisite: String?
        /// The identifier of the alarm recommendation.
        public let recommendationId: String
        /// The reference identifier of the alarm recommendation.
        public let referenceId: String
        /// The type of alarm recommendation.
        public let type: AlarmType

        public init(appComponentName: String? = nil, description: String? = nil, items: [RecommendationItem]? = nil, name: String, prerequisite: String? = nil, recommendationId: String, referenceId: String, type: AlarmType) {
            self.appComponentName = appComponentName
            self.description = description
            self.items = items
            self.name = name
            self.prerequisite = prerequisite
            self.recommendationId = recommendationId
            self.referenceId = referenceId
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case appComponentName
            case description
            case items
            case name
            case prerequisite
            case recommendationId
            case referenceId
            case type
        }
    }

    public struct App: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        ///  Assessment execution schedule with 'Daily' or 'Disabled' values.
        public let assessmentSchedule: AppAssessmentScheduleType?
        /// The current status of compliance for the resiliency policy.
        public let complianceStatus: AppComplianceStatusType?
        /// The timestamp for when the app was created.
        public let creationTime: Date
        /// The optional description for an app.
        public let description: String?
        /// The timestamp for the most recent compliance evaluation.
        public let lastAppComplianceEvaluationTime: Date?
        /// The timestamp for the most recent resiliency score evaluation.
        public let lastResiliencyScoreEvaluationTime: Date?
        /// The name for the application.
        public let name: String
        /// The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let policyArn: String?
        /// The current resiliency score for the application.
        public let resiliencyScore: Double?
        /// The status of the application.
        public let status: AppStatusType?
        /// The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource.
        /// Each tag consists of a key/value pair.
        public let tags: [String: String]?

        public init(appArn: String, assessmentSchedule: AppAssessmentScheduleType? = nil, complianceStatus: AppComplianceStatusType? = nil, creationTime: Date, description: String? = nil, lastAppComplianceEvaluationTime: Date? = nil, lastResiliencyScoreEvaluationTime: Date? = nil, name: String, policyArn: String? = nil, resiliencyScore: Double? = nil, status: AppStatusType? = nil, tags: [String: String]? = nil) {
            self.appArn = appArn
            self.assessmentSchedule = assessmentSchedule
            self.complianceStatus = complianceStatus
            self.creationTime = creationTime
            self.description = description
            self.lastAppComplianceEvaluationTime = lastAppComplianceEvaluationTime
            self.lastResiliencyScoreEvaluationTime = lastResiliencyScoreEvaluationTime
            self.name = name
            self.policyArn = policyArn
            self.resiliencyScore = resiliencyScore
            self.status = status
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case assessmentSchedule
            case complianceStatus
            case creationTime
            case description
            case lastAppComplianceEvaluationTime
            case lastResiliencyScoreEvaluationTime
            case name
            case policyArn
            case resiliencyScore
            case status
            case tags
        }
    }

    public struct AppAssessment: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String?
        /// The version of the application.
        public let appVersion: String?
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// The name of the assessment.
        public let assessmentName: String?
        /// The current status of the assessment for the resiliency policy.
        public let assessmentStatus: AssessmentStatus
        /// The application compliance against the resiliency policy.
        public let compliance: [DisruptionType: DisruptionCompliance]?
        /// The current status of the compliance for the resiliency policy.
        public let complianceStatus: ComplianceStatus?
        /// The cost for the application.
        public let cost: Cost?
        /// The end time for the action.
        public let endTime: Date?
        /// The entity that invoked the assessment.
        public let invoker: AssessmentInvoker
        /// Error or warning message from the assessment execution
        public let message: String?
        /// The resiliency policy.
        public let policy: ResiliencyPolicy?
        /// The current resiliency score for the application.
        public let resiliencyScore: ResiliencyScore?
        ///  A resource error object containing a list of errors retrieving an application's resources.
        public let resourceErrorsDetails: ResourceErrorsDetails?
        /// The starting time for the action.
        public let startTime: Date?
        /// The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource.
        /// Each tag consists of a key/value pair.
        public let tags: [String: String]?

        public init(appArn: String? = nil, appVersion: String? = nil, assessmentArn: String, assessmentName: String? = nil, assessmentStatus: AssessmentStatus, compliance: [DisruptionType: DisruptionCompliance]? = nil, complianceStatus: ComplianceStatus? = nil, cost: Cost? = nil, endTime: Date? = nil, invoker: AssessmentInvoker, message: String? = nil, policy: ResiliencyPolicy? = nil, resiliencyScore: ResiliencyScore? = nil, resourceErrorsDetails: ResourceErrorsDetails? = nil, startTime: Date? = nil, tags: [String: String]? = nil) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.assessmentArn = assessmentArn
            self.assessmentName = assessmentName
            self.assessmentStatus = assessmentStatus
            self.compliance = compliance
            self.complianceStatus = complianceStatus
            self.cost = cost
            self.endTime = endTime
            self.invoker = invoker
            self.message = message
            self.policy = policy
            self.resiliencyScore = resiliencyScore
            self.resourceErrorsDetails = resourceErrorsDetails
            self.startTime = startTime
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case assessmentArn
            case assessmentName
            case assessmentStatus
            case compliance
            case complianceStatus
            case cost
            case endTime
            case invoker
            case message
            case policy
            case resiliencyScore
            case resourceErrorsDetails
            case startTime
            case tags
        }
    }

    public struct AppAssessmentSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String?
        /// The version of the application.
        public let appVersion: String?
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// The name of the assessment.
        public let assessmentName: String?
        /// The current status of the assessment for the resiliency policy.
        public let assessmentStatus: AssessmentStatus
        /// The current status of compliance for the resiliency policy.
        public let complianceStatus: ComplianceStatus?
        /// The cost for the application.
        public let cost: Cost?
        /// The end time for the action.
        public let endTime: Date?
        /// The entity that invoked the assessment.
        public let invoker: AssessmentInvoker?
        /// The message from the assessment run.
        public let message: String?
        /// The current resiliency score for the application.
        public let resiliencyScore: Double?
        /// The starting time for the action.
        public let startTime: Date?

        public init(appArn: String? = nil, appVersion: String? = nil, assessmentArn: String, assessmentName: String? = nil, assessmentStatus: AssessmentStatus, complianceStatus: ComplianceStatus? = nil, cost: Cost? = nil, endTime: Date? = nil, invoker: AssessmentInvoker? = nil, message: String? = nil, resiliencyScore: Double? = nil, startTime: Date? = nil) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.assessmentArn = assessmentArn
            self.assessmentName = assessmentName
            self.assessmentStatus = assessmentStatus
            self.complianceStatus = complianceStatus
            self.cost = cost
            self.endTime = endTime
            self.invoker = invoker
            self.message = message
            self.resiliencyScore = resiliencyScore
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case assessmentArn
            case assessmentName
            case assessmentStatus
            case complianceStatus
            case cost
            case endTime
            case invoker
            case message
            case resiliencyScore
            case startTime
        }
    }

    public struct AppComponent: AWSDecodableShape {
        /// The name of the application component.
        public let name: String
        /// The type of application component.
        public let type: String

        public init(name: String, type: String) {
            self.name = name
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case type
        }
    }

    public struct AppComponentCompliance: AWSDecodableShape {
        /// The name of the application component.
        public let appComponentName: String?
        /// The compliance of the application component against the resiliency policy.
        public let compliance: [DisruptionType: DisruptionCompliance]?
        /// The cost for the application.
        public let cost: Cost?
        /// The compliance message.
        public let message: String?
        /// The current resiliency score for the application.
        public let resiliencyScore: ResiliencyScore?
        /// The status of the action.
        public let status: ComplianceStatus?

        public init(appComponentName: String? = nil, compliance: [DisruptionType: DisruptionCompliance]? = nil, cost: Cost? = nil, message: String? = nil, resiliencyScore: ResiliencyScore? = nil, status: ComplianceStatus? = nil) {
            self.appComponentName = appComponentName
            self.compliance = compliance
            self.cost = cost
            self.message = message
            self.resiliencyScore = resiliencyScore
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case appComponentName
            case compliance
            case cost
            case message
            case resiliencyScore
            case status
        }
    }

    public struct AppSummary: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        ///  Assessment execution schedule with 'Daily' or 'Disabled' values.
        public let assessmentSchedule: AppAssessmentScheduleType?
        /// The current status of compliance for the resiliency policy.
        public let complianceStatus: AppComplianceStatusType?
        /// The timestamp for when the app was created.
        public let creationTime: Date
        /// The optional description for an app.
        public let description: String?
        /// The name of the application.
        public let name: String
        /// The current resiliency score for the application.
        public let resiliencyScore: Double?
        /// The status of the application.
        public let status: AppStatusType?

        public init(appArn: String, assessmentSchedule: AppAssessmentScheduleType? = nil, complianceStatus: AppComplianceStatusType? = nil, creationTime: Date, description: String? = nil, name: String, resiliencyScore: Double? = nil, status: AppStatusType? = nil) {
            self.appArn = appArn
            self.assessmentSchedule = assessmentSchedule
            self.complianceStatus = complianceStatus
            self.creationTime = creationTime
            self.description = description
            self.name = name
            self.resiliencyScore = resiliencyScore
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case assessmentSchedule
            case complianceStatus
            case creationTime
            case description
            case name
            case resiliencyScore
            case status
        }
    }

    public struct AppVersionSummary: AWSDecodableShape {
        /// The version of the application.
        public let appVersion: String

        public init(appVersion: String) {
            self.appVersion = appVersion
        }

        private enum CodingKeys: String, CodingKey {
            case appVersion
        }
    }

    public struct ComponentRecommendation: AWSDecodableShape {
        /// The name of the application component.
        public let appComponentName: String
        /// The list of recommendations.
        public let configRecommendations: [ConfigRecommendation]
        /// The recommendation status.
        public let recommendationStatus: RecommendationComplianceStatus

        public init(appComponentName: String, configRecommendations: [ConfigRecommendation], recommendationStatus: RecommendationComplianceStatus) {
            self.appComponentName = appComponentName
            self.configRecommendations = configRecommendations
            self.recommendationStatus = recommendationStatus
        }

        private enum CodingKeys: String, CodingKey {
            case appComponentName
            case configRecommendations
            case recommendationStatus
        }
    }

    public struct ConfigRecommendation: AWSDecodableShape {
        /// The application component name.
        public let appComponentName: String?
        /// The current compliance against the resiliency policy before applying the configuration change.
        public let compliance: [DisruptionType: DisruptionCompliance]?
        /// The cost for the application.
        public let cost: Cost?
        /// The optional description for an app.
        public let description: String?
        /// The architecture type.
        public let haArchitecture: HaArchitecture?
        /// The name of the recommendation configuration.
        public let name: String
        /// The type of optimization.
        public let optimizationType: ConfigRecommendationOptimizationType
        /// The expected compliance against the resiliency policy after applying the configuration change.
        public let recommendationCompliance: [DisruptionType: RecommendationDisruptionCompliance]?
        /// The reference identifier for the recommendation configuration.
        public let referenceId: String
        /// List of the suggested configuration changes.
        public let suggestedChanges: [String]?

        public init(appComponentName: String? = nil, compliance: [DisruptionType: DisruptionCompliance]? = nil, cost: Cost? = nil, description: String? = nil, haArchitecture: HaArchitecture? = nil, name: String, optimizationType: ConfigRecommendationOptimizationType, recommendationCompliance: [DisruptionType: RecommendationDisruptionCompliance]? = nil, referenceId: String, suggestedChanges: [String]? = nil) {
            self.appComponentName = appComponentName
            self.compliance = compliance
            self.cost = cost
            self.description = description
            self.haArchitecture = haArchitecture
            self.name = name
            self.optimizationType = optimizationType
            self.recommendationCompliance = recommendationCompliance
            self.referenceId = referenceId
            self.suggestedChanges = suggestedChanges
        }

        private enum CodingKeys: String, CodingKey {
            case appComponentName
            case compliance
            case cost
            case description
            case haArchitecture
            case name
            case optimizationType
            case recommendationCompliance
            case referenceId
            case suggestedChanges
        }
    }

    public struct Cost: AWSDecodableShape {
        /// The cost amount.
        public let amount: Double
        /// The cost currency, for example USD.
        public let currency: String
        /// The cost frequency.
        public let frequency: CostFrequency

        public init(amount: Double, currency: String, frequency: CostFrequency) {
            self.amount = amount
            self.currency = currency
            self.frequency = frequency
        }

        private enum CodingKeys: String, CodingKey {
            case amount
            case currency
            case frequency
        }
    }

    public struct CreateAppRequest: AWSEncodableShape {
        ///  Assessment execution schedule with 'Daily' or 'Disabled' values.
        public let assessmentSchedule: AppAssessmentScheduleType?
        /// Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters.
        /// You should not reuse the same client token for other API requests.
        public let clientToken: String?
        /// The optional description for an app.
        public let description: String?
        /// The name for the application.
        public let name: String
        /// The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let policyArn: String?
        /// The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource.
        /// Each tag consists of a key/value pair.
        public let tags: [String: String]?

        public init(assessmentSchedule: AppAssessmentScheduleType? = nil, clientToken: String? = CreateAppRequest.idempotencyToken(), description: String? = nil, name: String, policyArn: String? = nil, tags: [String: String]? = nil) {
            self.assessmentSchedule = assessmentSchedule
            self.clientToken = clientToken
            self.description = description
            self.name = name
            self.policyArn = policyArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 63)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[A-za-z0-9_.-]{0,63}$")
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            try self.validate(self.policyArn, name: "policyArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[^\\x00-\\x1f\\x22]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^[^\\x00-\\x1f\\x22]*$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case assessmentSchedule
            case clientToken
            case description
            case name
            case policyArn
            case tags
        }
    }

    public struct CreateAppResponse: AWSDecodableShape {
        /// The created application returned as an object with details including compliance status, creation time, description, resiliency score, and more.
        public let app: App

        public init(app: App) {
            self.app = app
        }

        private enum CodingKeys: String, CodingKey {
            case app
        }
    }

    public struct CreateRecommendationTemplateRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// The name of the Amazon S3 bucket that will contain the recommendation template.
        public let bucketName: String?
        /// Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters.
        /// You should not reuse the same client token for other API requests.
        public let clientToken: String?
        /// The format for the recommendation template.  CfnJson  The template is CloudFormation JSON.  CfnYaml  The template is CloudFormation YAML.
        public let format: TemplateFormat?
        /// The name for the recommendation template.
        public let name: String
        /// Identifiers for the recommendations used to create a recommendation template.
        public let recommendationIds: [String]?
        /// An array of strings that specify the recommendation template type or types.  Alarm  The template is an AlarmRecommendation template.  Sop  The template is a SopRecommendation template.  Test  The template is a TestRecommendation template.
        public let recommendationTypes: [RenderRecommendationType]?
        /// The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource.
        /// Each tag consists of a key/value pair.
        public let tags: [String: String]?

        public init(assessmentArn: String, bucketName: String? = nil, clientToken: String? = CreateRecommendationTemplateRequest.idempotencyToken(), format: TemplateFormat? = nil, name: String, recommendationIds: [String]? = nil, recommendationTypes: [RenderRecommendationType]? = nil, tags: [String: String]? = nil) {
            self.assessmentArn = assessmentArn
            self.bucketName = bucketName
            self.clientToken = clientToken
            self.format = format
            self.name = name
            self.recommendationIds = recommendationIds
            self.recommendationTypes = recommendationTypes
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.assessmentArn, name: "assessmentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.bucketName, name: "bucketName", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 63)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[A-za-z0-9_.-]{0,63}$")
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            try self.recommendationIds?.forEach {
                try validate($0, name: "recommendationIds[]", parent: name, pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$")
            }
            try self.validate(self.recommendationIds, name: "recommendationIds", parent: name, max: 200)
            try self.validate(self.recommendationIds, name: "recommendationIds", parent: name, min: 1)
            try self.validate(self.recommendationTypes, name: "recommendationTypes", parent: name, max: 4)
            try self.validate(self.recommendationTypes, name: "recommendationTypes", parent: name, min: 1)
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[^\\x00-\\x1f\\x22]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^[^\\x00-\\x1f\\x22]*$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case assessmentArn
            case bucketName
            case clientToken
            case format
            case name
            case recommendationIds
            case recommendationTypes
            case tags
        }
    }

    public struct CreateRecommendationTemplateResponse: AWSDecodableShape {
        /// The newly created recommendation template, returned as an object. This object includes the template's name, format, status, tags, Amazon S3 bucket location, and more.
        public let recommendationTemplate: RecommendationTemplate?

        public init(recommendationTemplate: RecommendationTemplate? = nil) {
            self.recommendationTemplate = recommendationTemplate
        }

        private enum CodingKeys: String, CodingKey {
            case recommendationTemplate
        }
    }

    public struct CreateResiliencyPolicyRequest: AWSEncodableShape {
        /// Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters.
        /// You should not reuse the same client token for other API requests.
        public let clientToken: String?
        /// Specifies a high-level geographical location constraint for where your resilience policy data can be stored.
        public let dataLocationConstraint: DataLocationConstraint?
        /// The type of resiliency policy to be created, including the recovery time objective (RTO) and recovery point objective (RPO) in seconds.
        public let policy: [DisruptionType: FailurePolicy]
        /// The description for the policy.
        public let policyDescription: String?
        /// The name of the policy
        public let policyName: String
        /// The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource.
        /// Each tag consists of a key/value pair.
        public let tags: [String: String]?
        /// The tier for this resiliency policy, ranging from the highest severity (MissionCritical) to lowest (NonCritical).
        public let tier: ResiliencyPolicyTier

        public init(clientToken: String? = CreateResiliencyPolicyRequest.idempotencyToken(), dataLocationConstraint: DataLocationConstraint? = nil, policy: [DisruptionType: FailurePolicy], policyDescription: String? = nil, policyName: String, tags: [String: String]? = nil, tier: ResiliencyPolicyTier) {
            self.clientToken = clientToken
            self.dataLocationConstraint = dataLocationConstraint
            self.policy = policy
            self.policyDescription = policyDescription
            self.policyName = policyName
            self.tags = tags
            self.tier = tier
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 63)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[A-za-z0-9_.-]{0,63}$")
            try self.policy.forEach {
                try $0.value.validate(name: "\(name).policy[\"\($0.key)\"]")
            }
            try self.validate(self.policyDescription, name: "policyDescription", parent: name, max: 500)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[^\\x00-\\x1f\\x22]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^[^\\x00-\\x1f\\x22]*$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case dataLocationConstraint
            case policy
            case policyDescription
            case policyName
            case tags
            case tier
        }
    }

    public struct CreateResiliencyPolicyResponse: AWSDecodableShape {
        /// The type of resiliency policy that was created, including the recovery time objective (RTO) and recovery point objective (RPO) in seconds.
        public let policy: ResiliencyPolicy

        public init(policy: ResiliencyPolicy) {
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case policy
        }
    }

    public struct DeleteAppAssessmentRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters.
        /// You should not reuse the same client token for other API requests.
        public let clientToken: String?

        public init(assessmentArn: String, clientToken: String? = DeleteAppAssessmentRequest.idempotencyToken()) {
            self.assessmentArn = assessmentArn
            self.clientToken = clientToken
        }

        public func validate(name: String) throws {
            try self.validate(self.assessmentArn, name: "assessmentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 63)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[A-za-z0-9_.-]{0,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case assessmentArn
            case clientToken
        }
    }

    public struct DeleteAppAssessmentResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// The current status of the assessment for the resiliency policy.
        public let assessmentStatus: AssessmentStatus

        public init(assessmentArn: String, assessmentStatus: AssessmentStatus) {
            self.assessmentArn = assessmentArn
            self.assessmentStatus = assessmentStatus
        }

        private enum CodingKeys: String, CodingKey {
            case assessmentArn
            case assessmentStatus
        }
    }

    public struct DeleteAppRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters.
        /// You should not reuse the same client token for other API requests.
        public let clientToken: String?
        /// A boolean option to force the deletion of a Resilience Hub application.
        public let forceDelete: Bool?

        public init(appArn: String, clientToken: String? = DeleteAppRequest.idempotencyToken(), forceDelete: Bool? = nil) {
            self.appArn = appArn
            self.clientToken = clientToken
            self.forceDelete = forceDelete
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 63)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[A-za-z0-9_.-]{0,63}$")
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case clientToken
            case forceDelete
        }
    }

    public struct DeleteAppResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String

        public init(appArn: String) {
            self.appArn = appArn
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
        }
    }

    public struct DeleteRecommendationTemplateRequest: AWSEncodableShape {
        /// Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters.
        /// You should not reuse the same client token for other API requests.
        public let clientToken: String?
        /// The Amazon Resource Name (ARN) for a recommendation template.
        public let recommendationTemplateArn: String

        public init(clientToken: String? = DeleteRecommendationTemplateRequest.idempotencyToken(), recommendationTemplateArn: String) {
            self.clientToken = clientToken
            self.recommendationTemplateArn = recommendationTemplateArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 63)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[A-za-z0-9_.-]{0,63}$")
            try self.validate(self.recommendationTemplateArn, name: "recommendationTemplateArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case recommendationTemplateArn
        }
    }

    public struct DeleteRecommendationTemplateResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) for a recommendation template.
        public let recommendationTemplateArn: String
        /// The status of the action.
        public let status: RecommendationTemplateStatus

        public init(recommendationTemplateArn: String, status: RecommendationTemplateStatus) {
            self.recommendationTemplateArn = recommendationTemplateArn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case recommendationTemplateArn
            case status
        }
    }

    public struct DeleteResiliencyPolicyRequest: AWSEncodableShape {
        /// Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters.
        /// You should not reuse the same client token for other API requests.
        public let clientToken: String?
        /// The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let policyArn: String

        public init(clientToken: String? = DeleteResiliencyPolicyRequest.idempotencyToken(), policyArn: String) {
            self.clientToken = clientToken
            self.policyArn = policyArn
        }

        public func validate(name: String) throws {
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 63)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[A-za-z0-9_.-]{0,63}$")
            try self.validate(self.policyArn, name: "policyArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case policyArn
        }
    }

    public struct DeleteResiliencyPolicyResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let policyArn: String

        public init(policyArn: String) {
            self.policyArn = policyArn
        }

        private enum CodingKeys: String, CodingKey {
            case policyArn
        }
    }

    public struct DescribeAppAssessmentRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String

        public init(assessmentArn: String) {
            self.assessmentArn = assessmentArn
        }

        public func validate(name: String) throws {
            try self.validate(self.assessmentArn, name: "assessmentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case assessmentArn
        }
    }

    public struct DescribeAppAssessmentResponse: AWSDecodableShape {
        /// The assessment for an AWS Resilience Hub application, returned as an object. This object includes Amazon Resource Names (ARNs), compliance information, compliance status, cost, messages, resiliency scores, and more.
        public let assessment: AppAssessment

        public init(assessment: AppAssessment) {
            self.assessment = assessment
        }

        private enum CodingKeys: String, CodingKey {
            case assessment
        }
    }

    public struct DescribeAppRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String

        public init(appArn: String) {
            self.appArn = appArn
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
        }
    }

    public struct DescribeAppResponse: AWSDecodableShape {
        /// The specified application, returned as an object with details including compliance status, creation time, description, resiliency score, and more.
        public let app: App

        public init(app: App) {
            self.app = app
        }

        private enum CodingKeys: String, CodingKey {
            case app
        }
    }

    public struct DescribeAppVersionResourcesResolutionStatusRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String
        /// The identifier for a specific resolution.
        public let resolutionId: String?

        public init(appArn: String, appVersion: String, resolutionId: String? = nil) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.resolutionId = resolutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.appVersion, name: "appVersion", parent: name, pattern: "^\\S{1,50}$")
            try self.validate(self.resolutionId, name: "resolutionId", parent: name, max: 255)
            try self.validate(self.resolutionId, name: "resolutionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case resolutionId
        }
    }

    public struct DescribeAppVersionResourcesResolutionStatusResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String
        /// The returned error message for the request.
        public let errorMessage: String?
        /// The identifier for a specific resolution.
        public let resolutionId: String
        /// The status of the action.
        public let status: ResourceResolutionStatusType

        public init(appArn: String, appVersion: String, errorMessage: String? = nil, resolutionId: String, status: ResourceResolutionStatusType) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.errorMessage = errorMessage
            self.resolutionId = resolutionId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case errorMessage
            case resolutionId
            case status
        }
    }

    public struct DescribeAppVersionTemplateRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String

        public init(appArn: String, appVersion: String) {
            self.appArn = appArn
            self.appVersion = appVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.appVersion, name: "appVersion", parent: name, pattern: "^\\S{1,50}$")
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
        }
    }

    public struct DescribeAppVersionTemplateResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The body of the template.
        public let appTemplateBody: String
        /// The version of the application.
        public let appVersion: String

        public init(appArn: String, appTemplateBody: String, appVersion: String) {
            self.appArn = appArn
            self.appTemplateBody = appTemplateBody
            self.appVersion = appVersion
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appTemplateBody
            case appVersion
        }
    }

    public struct DescribeDraftAppVersionResourcesImportStatusRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String

        public init(appArn: String) {
            self.appArn = appArn
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
        }
    }

    public struct DescribeDraftAppVersionResourcesImportStatusResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String
        /// The returned error message for the request.
        public let errorMessage: String?
        /// The status of the action.
        public let status: ResourceImportStatusType
        /// The timestamp for when the status last changed.
        public let statusChangeTime: Date

        public init(appArn: String, appVersion: String, errorMessage: String? = nil, status: ResourceImportStatusType, statusChangeTime: Date) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.errorMessage = errorMessage
            self.status = status
            self.statusChangeTime = statusChangeTime
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case errorMessage
            case status
            case statusChangeTime
        }
    }

    public struct DescribeResiliencyPolicyRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let policyArn: String

        public init(policyArn: String) {
            self.policyArn = policyArn
        }

        public func validate(name: String) throws {
            try self.validate(self.policyArn, name: "policyArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case policyArn
        }
    }

    public struct DescribeResiliencyPolicyResponse: AWSDecodableShape {
        /// Information about the specific resiliency policy, returned as an object. This object includes creation time, data location constraints, its name, description, tags, the recovery time objective (RTO) and recovery point objective (RPO) in seconds, and more.
        public let policy: ResiliencyPolicy

        public init(policy: ResiliencyPolicy) {
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case policy
        }
    }

    public struct DisruptionCompliance: AWSDecodableShape {
        /// The Recovery Point Objective (RPO) that is achievable, in seconds.
        public let achievableRpoInSecs: Int?
        /// The Recovery Time Objective (RTO) that is achievable, in seconds
        public let achievableRtoInSecs: Int?
        /// The current status of compliance for the resiliency policy.
        public let complianceStatus: ComplianceStatus
        /// The current RPO, in seconds.
        public let currentRpoInSecs: Int?
        /// The current RTO, in seconds.
        public let currentRtoInSecs: Int?
        /// The disruption compliance message.
        public let message: String?
        /// The RPO description.
        public let rpoDescription: String?
        /// The RPO reference identifier.
        public let rpoReferenceId: String?
        /// The RTO description.
        public let rtoDescription: String?
        /// The RTO reference identifier.
        public let rtoReferenceId: String?

        public init(achievableRpoInSecs: Int? = nil, achievableRtoInSecs: Int? = nil, complianceStatus: ComplianceStatus, currentRpoInSecs: Int? = nil, currentRtoInSecs: Int? = nil, message: String? = nil, rpoDescription: String? = nil, rpoReferenceId: String? = nil, rtoDescription: String? = nil, rtoReferenceId: String? = nil) {
            self.achievableRpoInSecs = achievableRpoInSecs
            self.achievableRtoInSecs = achievableRtoInSecs
            self.complianceStatus = complianceStatus
            self.currentRpoInSecs = currentRpoInSecs
            self.currentRtoInSecs = currentRtoInSecs
            self.message = message
            self.rpoDescription = rpoDescription
            self.rpoReferenceId = rpoReferenceId
            self.rtoDescription = rtoDescription
            self.rtoReferenceId = rtoReferenceId
        }

        private enum CodingKeys: String, CodingKey {
            case achievableRpoInSecs
            case achievableRtoInSecs
            case complianceStatus
            case currentRpoInSecs
            case currentRtoInSecs
            case message
            case rpoDescription
            case rpoReferenceId
            case rtoDescription
            case rtoReferenceId
        }
    }

    public struct FailurePolicy: AWSEncodableShape & AWSDecodableShape {
        /// The Recovery Point Objective (RPO), in seconds.
        public let rpoInSecs: Int
        /// The Recovery Time Objective (RTO), in seconds.
        public let rtoInSecs: Int

        public init(rpoInSecs: Int, rtoInSecs: Int) {
            self.rpoInSecs = rpoInSecs
            self.rtoInSecs = rtoInSecs
        }

        public func validate(name: String) throws {
            try self.validate(self.rpoInSecs, name: "rpoInSecs", parent: name, min: 0)
            try self.validate(self.rtoInSecs, name: "rtoInSecs", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case rpoInSecs
            case rtoInSecs
        }
    }

    public struct ImportResourcesToDraftAppVersionRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The Amazon Resource Names (ARNs) for the resources that you want to import.
        public let sourceArns: [String]?
        ///  A list of terraform file s3 URLs you need to import.
        public let terraformSources: [TerraformSource]?

        public init(appArn: String, sourceArns: [String]? = nil, terraformSources: [TerraformSource]? = nil) {
            self.appArn = appArn
            self.sourceArns = sourceArns
            self.terraformSources = terraformSources
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.sourceArns?.forEach {
                try validate($0, name: "sourceArns[]", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            }
            try self.terraformSources?.forEach {
                try $0.validate(name: "\(name).terraformSources[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case sourceArns
            case terraformSources
        }
    }

    public struct ImportResourcesToDraftAppVersionResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String
        /// The Amazon Resource Names (ARNs) for the resources that you imported.
        public let sourceArns: [String]?
        /// The status of the action.
        public let status: ResourceImportStatusType
        ///  A list of terraform file s3 URLs you need to import.
        public let terraformSources: [TerraformSource]?

        public init(appArn: String, appVersion: String, sourceArns: [String]? = nil, status: ResourceImportStatusType, terraformSources: [TerraformSource]? = nil) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.sourceArns = sourceArns
            self.status = status
            self.terraformSources = terraformSources
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case sourceArns
            case status
            case terraformSources
        }
    }

    public struct ListAlarmRecommendationsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?

        public init(assessmentArn: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.assessmentArn = assessmentArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.assessmentArn, name: "assessmentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
        }

        private enum CodingKeys: String, CodingKey {
            case assessmentArn
            case maxResults
            case nextToken
        }
    }

    public struct ListAlarmRecommendationsResponse: AWSDecodableShape {
        /// The alarm recommendations for an AWS Resilience Hub application, returned as an object. This object includes application component names, descriptions, information about whether a recommendation has already been implemented or not, prerequisites, and more.
        public let alarmRecommendations: [AlarmRecommendation]
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?

        public init(alarmRecommendations: [AlarmRecommendation], nextToken: String? = nil) {
            self.alarmRecommendations = alarmRecommendations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case alarmRecommendations
            case nextToken
        }
    }

    public struct ListAppAssessmentsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appArn", location: .querystring("appArn")),
            AWSMemberEncoding(label: "assessmentName", location: .querystring("assessmentName")),
            AWSMemberEncoding(label: "assessmentStatus", location: .querystring("assessmentStatus")),
            AWSMemberEncoding(label: "complianceStatus", location: .querystring("complianceStatus")),
            AWSMemberEncoding(label: "invoker", location: .querystring("invoker")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken")),
            AWSMemberEncoding(label: "reverseOrder", location: .querystring("reverseOrder"))
        ]

        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String?
        /// The name for the assessment.
        public let assessmentName: String?
        /// The current status of the assessment for the resiliency policy.
        public let assessmentStatus: [AssessmentStatus]?
        /// The current status of compliance for the resiliency policy.
        public let complianceStatus: ComplianceStatus?
        /// Specifies the entity that invoked a specific assessment, either a User or the System.
        public let invoker: AssessmentInvoker?
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?
        /// The default is to sort by ascending startTime.
        /// To sort by descending startTime, set reverseOrder to true.
        public let reverseOrder: Bool?

        public init(appArn: String? = nil, assessmentName: String? = nil, assessmentStatus: [AssessmentStatus]? = nil, complianceStatus: ComplianceStatus? = nil, invoker: AssessmentInvoker? = nil, maxResults: Int? = nil, nextToken: String? = nil, reverseOrder: Bool? = nil) {
            self.appArn = appArn
            self.assessmentName = assessmentName
            self.assessmentStatus = assessmentStatus
            self.complianceStatus = complianceStatus
            self.invoker = invoker
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.reverseOrder = reverseOrder
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.assessmentName, name: "assessmentName", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            try self.validate(self.assessmentStatus, name: "assessmentStatus", parent: name, max: 10)
            try self.validate(self.assessmentStatus, name: "assessmentStatus", parent: name, min: 1)
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAppAssessmentsResponse: AWSDecodableShape {
        /// The summaries for the specified assessments, returned as an object. This object includes application versions, associated Amazon Resource Numbers (ARNs), cost, messages, resiliency scores, and more.
        public let assessmentSummaries: [AppAssessmentSummary]
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?

        public init(assessmentSummaries: [AppAssessmentSummary], nextToken: String? = nil) {
            self.assessmentSummaries = assessmentSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case assessmentSummaries
            case nextToken
        }
    }

    public struct ListAppComponentCompliancesRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?

        public init(assessmentArn: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.assessmentArn = assessmentArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.assessmentArn, name: "assessmentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
        }

        private enum CodingKeys: String, CodingKey {
            case assessmentArn
            case maxResults
            case nextToken
        }
    }

    public struct ListAppComponentCompliancesResponse: AWSDecodableShape {
        /// The compliances for an AWS Resilience Hub application component, returned as an object. This object contains component names, compliances, costs, resiliency scores, outage scores, and more.
        public let componentCompliances: [AppComponentCompliance]
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?

        public init(componentCompliances: [AppComponentCompliance], nextToken: String? = nil) {
            self.componentCompliances = componentCompliances
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case componentCompliances
            case nextToken
        }
    }

    public struct ListAppComponentRecommendationsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?

        public init(assessmentArn: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.assessmentArn = assessmentArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.assessmentArn, name: "assessmentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
        }

        private enum CodingKeys: String, CodingKey {
            case assessmentArn
            case maxResults
            case nextToken
        }
    }

    public struct ListAppComponentRecommendationsResponse: AWSDecodableShape {
        /// The recommendations for an Resilience Hub application component, returned as an object. This object contains component names, configuration recommendations, and recommendation statuses.
        public let componentRecommendations: [ComponentRecommendation]
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?

        public init(componentRecommendations: [ComponentRecommendation], nextToken: String? = nil) {
            self.componentRecommendations = componentRecommendations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case componentRecommendations
            case nextToken
        }
    }

    public struct ListAppVersionResourceMappingsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?

        public init(appArn: String, appVersion: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.appVersion, name: "appVersion", parent: name, pattern: "^\\S{1,50}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case maxResults
            case nextToken
        }
    }

    public struct ListAppVersionResourceMappingsResponse: AWSDecodableShape {
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?
        /// Mappings used to map logical resources from the template to physical resources. You can use the mapping type CFN_STACK if the application template uses a logical stack name. Or you can map individual resources by using the mapping type RESOURCE. We recommend using the mapping type CFN_STACK if the application is backed by a CloudFormation stack.
        public let resourceMappings: [ResourceMapping]

        public init(nextToken: String? = nil, resourceMappings: [ResourceMapping]) {
            self.nextToken = nextToken
            self.resourceMappings = resourceMappings
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resourceMappings
        }
    }

    public struct ListAppVersionResourcesRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?
        /// The identifier for a specific resolution.
        public let resolutionId: String?

        public init(appArn: String, appVersion: String, maxResults: Int? = nil, nextToken: String? = nil, resolutionId: String? = nil) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resolutionId = resolutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.appVersion, name: "appVersion", parent: name, pattern: "^\\S{1,50}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
            try self.validate(self.resolutionId, name: "resolutionId", parent: name, max: 255)
            try self.validate(self.resolutionId, name: "resolutionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case maxResults
            case nextToken
            case resolutionId
        }
    }

    public struct ListAppVersionResourcesResponse: AWSDecodableShape {
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?
        /// The physical resources in the application version.
        public let physicalResources: [PhysicalResource]
        /// The identifier for a specific resolution.
        public let resolutionId: String

        public init(nextToken: String? = nil, physicalResources: [PhysicalResource], resolutionId: String) {
            self.nextToken = nextToken
            self.physicalResources = physicalResources
            self.resolutionId = resolutionId
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case physicalResources
            case resolutionId
        }
    }

    public struct ListAppVersionsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?

        public init(appArn: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.appArn = appArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case maxResults
            case nextToken
        }
    }

    public struct ListAppVersionsResponse: AWSDecodableShape {
        /// The version of the application.
        public let appVersions: [AppVersionSummary]
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?

        public init(appVersions: [AppVersionSummary], nextToken: String? = nil) {
            self.appVersions = appVersions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case appVersions
            case nextToken
        }
    }

    public struct ListAppsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "appArn", location: .querystring("appArn")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "name", location: .querystring("name")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String?
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// The name for the one of the listed applications.
        public let name: String?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?

        public init(appArn: String? = nil, maxResults: Int? = nil, name: String? = nil, nextToken: String? = nil) {
            self.appArn = appArn
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAppsResponse: AWSDecodableShape {
        /// Summaries for the Resilience Hub application.
        public let appSummaries: [AppSummary]
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?

        public init(appSummaries: [AppSummary], nextToken: String? = nil) {
            self.appSummaries = appSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case appSummaries
            case nextToken
        }
    }

    public struct ListRecommendationTemplatesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "assessmentArn", location: .querystring("assessmentArn")),
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "name", location: .querystring("name")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken")),
            AWSMemberEncoding(label: "recommendationTemplateArn", location: .querystring("recommendationTemplateArn")),
            AWSMemberEncoding(label: "reverseOrder", location: .querystring("reverseOrder")),
            AWSMemberEncoding(label: "status", location: .querystring("status"))
        ]

        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// The name for one of the listed recommendation templates.
        public let name: String?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) for a recommendation template.
        public let recommendationTemplateArn: String?
        /// The default is to sort by ascending startTime.
        /// To sort by descending startTime, set reverseOrder to true.
        public let reverseOrder: Bool?
        /// The status of the action.
        public let status: [RecommendationTemplateStatus]?

        public init(assessmentArn: String, maxResults: Int? = nil, name: String? = nil, nextToken: String? = nil, recommendationTemplateArn: String? = nil, reverseOrder: Bool? = nil, status: [RecommendationTemplateStatus]? = nil) {
            self.assessmentArn = assessmentArn
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
            self.recommendationTemplateArn = recommendationTemplateArn
            self.reverseOrder = reverseOrder
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.assessmentArn, name: "assessmentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
            try self.validate(self.recommendationTemplateArn, name: "recommendationTemplateArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.status, name: "status", parent: name, max: 4)
            try self.validate(self.status, name: "status", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListRecommendationTemplatesResponse: AWSDecodableShape {
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?
        /// The recommendation templates for the Resilience Hub applications.
        public let recommendationTemplates: [RecommendationTemplate]?

        public init(nextToken: String? = nil, recommendationTemplates: [RecommendationTemplate]? = nil) {
            self.nextToken = nextToken
            self.recommendationTemplates = recommendationTemplates
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case recommendationTemplates
        }
    }

    public struct ListResiliencyPoliciesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken")),
            AWSMemberEncoding(label: "policyName", location: .querystring("policyName"))
        ]

        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?
        /// The name of the policy
        public let policyName: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, policyName: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.policyName = policyName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListResiliencyPoliciesResponse: AWSDecodableShape {
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?
        /// The resiliency policies for the Resilience Hub applications.
        public let resiliencyPolicies: [ResiliencyPolicy]

        public init(nextToken: String? = nil, resiliencyPolicies: [ResiliencyPolicy]) {
            self.nextToken = nextToken
            self.resiliencyPolicies = resiliencyPolicies
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resiliencyPolicies
        }
    }

    public struct ListSopRecommendationsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?

        public init(assessmentArn: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.assessmentArn = assessmentArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.assessmentArn, name: "assessmentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
        }

        private enum CodingKeys: String, CodingKey {
            case assessmentArn
            case maxResults
            case nextToken
        }
    }

    public struct ListSopRecommendationsResponse: AWSDecodableShape {
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?
        /// The standard operating procedure (SOP) recommendations for the Resilience Hub applications.
        public let sopRecommendations: [SopRecommendation]

        public init(nextToken: String? = nil, sopRecommendations: [SopRecommendation]) {
            self.nextToken = nextToken
            self.sopRecommendations = sopRecommendations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case sopRecommendations
        }
    }

    public struct ListSuggestedResiliencyPoliciesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring("maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring("nextToken"))
        ]

        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSuggestedResiliencyPoliciesResponse: AWSDecodableShape {
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?
        /// The suggested resiliency policies for the Resilience Hub applications.
        public let resiliencyPolicies: [ResiliencyPolicy]

        public init(nextToken: String? = nil, resiliencyPolicies: [ResiliencyPolicy]) {
            self.nextToken = nextToken
            self.resiliencyPolicies = resiliencyPolicies
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resiliencyPolicies
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The Amazon Resource Name (ARN) for a specific resource in your Resilience Hub application.
        public let resourceArn: String

        public init(resourceArn: String) {
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource.
        /// Each tag consists of a key/value pair.
        public let tags: [String: String]?

        public init(tags: [String: String]? = nil) {
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct ListTestRecommendationsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?

        public init(assessmentArn: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.assessmentArn = assessmentArn
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.assessmentArn, name: "assessmentArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
        }

        private enum CodingKeys: String, CodingKey {
            case assessmentArn
            case maxResults
            case nextToken
        }
    }

    public struct ListTestRecommendationsResponse: AWSDecodableShape {
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?
        /// The test recommendations for the Resilience Hub application.
        public let testRecommendations: [TestRecommendation]

        public init(nextToken: String? = nil, testRecommendations: [TestRecommendation]) {
            self.nextToken = nextToken
            self.testRecommendations = testRecommendations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case testRecommendations
        }
    }

    public struct ListUnsupportedAppVersionResourcesRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String
        /// The maximum number of results to include in the response. If more results exist than the specified
        /// MaxResults value, a token is included in the response so that the remaining results can be retrieved.
        public let maxResults: Int?
        /// Null, or the token from a previous call to get the next set of results.
        public let nextToken: String?
        /// The identifier for a specific resolution.
        public let resolutionId: String?

        public init(appArn: String, appVersion: String, maxResults: Int? = nil, nextToken: String? = nil, resolutionId: String? = nil) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resolutionId = resolutionId
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.appVersion, name: "appVersion", parent: name, pattern: "^\\S{1,50}$")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: "^\\S{1,2000}$")
            try self.validate(self.resolutionId, name: "resolutionId", parent: name, max: 255)
            try self.validate(self.resolutionId, name: "resolutionId", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case maxResults
            case nextToken
            case resolutionId
        }
    }

    public struct ListUnsupportedAppVersionResourcesResponse: AWSDecodableShape {
        /// The token for the next set of results, or null if there are no more results.
        public let nextToken: String?
        /// The identifier for a specific resolution.
        public let resolutionId: String
        /// The unsupported resources for the application.
        public let unsupportedResources: [UnsupportedResource]

        public init(nextToken: String? = nil, resolutionId: String, unsupportedResources: [UnsupportedResource]) {
            self.nextToken = nextToken
            self.resolutionId = resolutionId
            self.unsupportedResources = unsupportedResources
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resolutionId
            case unsupportedResources
        }
    }

    public struct LogicalResourceId: AWSDecodableShape {
        /// The identifier of the resource.
        public let identifier: String
        /// The name of the CloudFormation stack this resource belongs to.
        public let logicalStackName: String?
        /// The name of the resource group that this resource belongs to.
        public let resourceGroupName: String?
        ///  The name of the Terraform S3 state file this resource belongs to.
        public let terraformSourceName: String?

        public init(identifier: String, logicalStackName: String? = nil, resourceGroupName: String? = nil, terraformSourceName: String? = nil) {
            self.identifier = identifier
            self.logicalStackName = logicalStackName
            self.resourceGroupName = resourceGroupName
            self.terraformSourceName = terraformSourceName
        }

        private enum CodingKeys: String, CodingKey {
            case identifier
            case logicalStackName
            case resourceGroupName
            case terraformSourceName
        }
    }

    public struct PhysicalResource: AWSDecodableShape {
        /// The application components that belong to this resource.
        public let appComponents: [AppComponent]?
        /// The logical identifier of the resource.
        public let logicalResourceId: LogicalResourceId
        /// The physical identifier of the resource.
        public let physicalResourceId: PhysicalResourceId
        /// The name of the resource.
        public let resourceName: String?
        /// The type of resource.
        public let resourceType: String

        public init(appComponents: [AppComponent]? = nil, logicalResourceId: LogicalResourceId, physicalResourceId: PhysicalResourceId, resourceName: String? = nil, resourceType: String) {
            self.appComponents = appComponents
            self.logicalResourceId = logicalResourceId
            self.physicalResourceId = physicalResourceId
            self.resourceName = resourceName
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case appComponents
            case logicalResourceId
            case physicalResourceId
            case resourceName
            case resourceType
        }
    }

    public struct PhysicalResourceId: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Web Services account that owns the physical resource.
        public let awsAccountId: String?
        /// The Amazon Web Services Region that the physical resource is located in.
        public let awsRegion: String?
        /// The identifier of the physical resource.
        public let identifier: String
        /// Specifies the type of physical resource identifier.  Arn  The resource identifier is an Amazon Resource Name (ARN) .  Native  The resource identifier is a Resilience Hub-native identifier.
        public let type: PhysicalIdentifierType

        public init(awsAccountId: String? = nil, awsRegion: String? = nil, identifier: String, type: PhysicalIdentifierType) {
            self.awsAccountId = awsAccountId
            self.awsRegion = awsRegion
            self.identifier = identifier
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.awsAccountId, name: "awsAccountId", parent: name, pattern: "^[0-9]{12}$")
            try self.validate(self.awsRegion, name: "awsRegion", parent: name, pattern: "^[a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]$")
            try self.validate(self.identifier, name: "identifier", parent: name, max: 255)
            try self.validate(self.identifier, name: "identifier", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case awsAccountId
            case awsRegion
            case identifier
            case type
        }
    }

    public struct PublishAppVersionRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String

        public init(appArn: String) {
            self.appArn = appArn
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
        }
    }

    public struct PublishAppVersionResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String?

        public init(appArn: String, appVersion: String? = nil) {
            self.appArn = appArn
            self.appVersion = appVersion
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
        }
    }

    public struct PutDraftAppVersionTemplateRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// A JSON string that contains the body of the app template.
        public let appTemplateBody: String

        public init(appArn: String, appTemplateBody: String) {
            self.appArn = appArn
            self.appTemplateBody = appTemplateBody
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.appTemplateBody, name: "appTemplateBody", parent: name, max: 204_800)
            try self.validate(self.appTemplateBody, name: "appTemplateBody", parent: name, pattern: "^[\\w\\s:,-\\.'{}\\[\\]:\"]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appTemplateBody
        }
    }

    public struct PutDraftAppVersionTemplateResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String?
        /// The version of the application.
        public let appVersion: String?

        public init(appArn: String? = nil, appVersion: String? = nil) {
            self.appArn = appArn
            self.appVersion = appVersion
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
        }
    }

    public struct RecommendationDisruptionCompliance: AWSDecodableShape {
        /// The expected compliance status after applying the recommended configuration change.
        public let expectedComplianceStatus: ComplianceStatus
        /// The expected Recovery Point Objective (RPO) description after applying the recommended configuration change.
        public let expectedRpoDescription: String?
        /// The expected RPO after applying the recommended configuration change.
        public let expectedRpoInSecs: Int?
        /// The expected Recovery Time Objective (RTO) description after applying the recommended configuration change.
        public let expectedRtoDescription: String?
        /// The expected RTO after applying the recommended configuration change.
        public let expectedRtoInSecs: Int?

        public init(expectedComplianceStatus: ComplianceStatus, expectedRpoDescription: String? = nil, expectedRpoInSecs: Int? = nil, expectedRtoDescription: String? = nil, expectedRtoInSecs: Int? = nil) {
            self.expectedComplianceStatus = expectedComplianceStatus
            self.expectedRpoDescription = expectedRpoDescription
            self.expectedRpoInSecs = expectedRpoInSecs
            self.expectedRtoDescription = expectedRtoDescription
            self.expectedRtoInSecs = expectedRtoInSecs
        }

        private enum CodingKeys: String, CodingKey {
            case expectedComplianceStatus
            case expectedRpoDescription
            case expectedRpoInSecs
            case expectedRtoDescription
            case expectedRtoInSecs
        }
    }

    public struct RecommendationItem: AWSDecodableShape {
        /// Specifies if the recommendation has already been implemented.
        public let alreadyImplemented: Bool?
        /// The resource identifier.
        public let resourceId: String?
        /// The target account identifier.
        public let targetAccountId: String?
        /// The target region.
        public let targetRegion: String?

        public init(alreadyImplemented: Bool? = nil, resourceId: String? = nil, targetAccountId: String? = nil, targetRegion: String? = nil) {
            self.alreadyImplemented = alreadyImplemented
            self.resourceId = resourceId
            self.targetAccountId = targetAccountId
            self.targetRegion = targetRegion
        }

        private enum CodingKeys: String, CodingKey {
            case alreadyImplemented
            case resourceId
            case targetAccountId
            case targetRegion
        }
    }

    public struct RecommendationTemplate: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String?
        /// The Amazon Resource Name (ARN) of the assessment. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app-assessment/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let assessmentArn: String
        /// The end time for the action.
        public let endTime: Date?
        /// The format of the recommendation template.  CfnJson  The template is CloudFormation JSON.  CfnYaml  The template is CloudFormation YAML.
        public let format: TemplateFormat
        /// The message for the recommendation template.
        public let message: String?
        /// The name for the recommendation template.
        public let name: String
        /// Indicates if replacements are needed.
        public let needsReplacements: Bool?
        /// Identifiers for the recommendations used in the recommendation template.
        public let recommendationIds: [String]?
        /// The Amazon Resource Name (ARN) for the recommendation template.
        public let recommendationTemplateArn: String
        /// An array of strings that specify the recommendation template type or types.  Alarm  The template is an AlarmRecommendation template.  Sop  The template is a SopRecommendation template.  Test  The template is a TestRecommendation template.
        public let recommendationTypes: [RenderRecommendationType]
        /// The start time for the action.
        public let startTime: Date?
        /// The status of the action.
        public let status: RecommendationTemplateStatus
        /// The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource.
        /// Each tag consists of a key/value pair.
        public let tags: [String: String]?
        /// The file location of the template.
        public let templatesLocation: S3Location?

        public init(appArn: String? = nil, assessmentArn: String, endTime: Date? = nil, format: TemplateFormat, message: String? = nil, name: String, needsReplacements: Bool? = nil, recommendationIds: [String]? = nil, recommendationTemplateArn: String, recommendationTypes: [RenderRecommendationType], startTime: Date? = nil, status: RecommendationTemplateStatus, tags: [String: String]? = nil, templatesLocation: S3Location? = nil) {
            self.appArn = appArn
            self.assessmentArn = assessmentArn
            self.endTime = endTime
            self.format = format
            self.message = message
            self.name = name
            self.needsReplacements = needsReplacements
            self.recommendationIds = recommendationIds
            self.recommendationTemplateArn = recommendationTemplateArn
            self.recommendationTypes = recommendationTypes
            self.startTime = startTime
            self.status = status
            self.tags = tags
            self.templatesLocation = templatesLocation
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case assessmentArn
            case endTime
            case format
            case message
            case name
            case needsReplacements
            case recommendationIds
            case recommendationTemplateArn
            case recommendationTypes
            case startTime
            case status
            case tags
            case templatesLocation
        }
    }

    public struct RemoveDraftAppVersionResourceMappingsRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The names of the registered applications to remove from the resource mappings.
        public let appRegistryAppNames: [String]?
        /// The names of the CloudFormation stacks to remove from the resource mappings.
        public let logicalStackNames: [String]?
        /// The names of the resource groups to remove from the resource mappings.
        public let resourceGroupNames: [String]?
        /// The names of the resources to remove from the resource mappings.
        public let resourceNames: [String]?
        ///
        public let terraformSourceNames: [String]?

        public init(appArn: String, appRegistryAppNames: [String]? = nil, logicalStackNames: [String]? = nil, resourceGroupNames: [String]? = nil, resourceNames: [String]? = nil, terraformSourceNames: [String]? = nil) {
            self.appArn = appArn
            self.appRegistryAppNames = appRegistryAppNames
            self.logicalStackNames = logicalStackNames
            self.resourceGroupNames = resourceGroupNames
            self.resourceNames = resourceNames
            self.terraformSourceNames = terraformSourceNames
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.appRegistryAppNames?.forEach {
                try validate($0, name: "appRegistryAppNames[]", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            }
            try self.logicalStackNames?.forEach {
                try validate($0, name: "logicalStackNames[]", parent: name, max: 255)
                try validate($0, name: "logicalStackNames[]", parent: name, min: 1)
            }
            try self.resourceGroupNames?.forEach {
                try validate($0, name: "resourceGroupNames[]", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            }
            try self.resourceNames?.forEach {
                try validate($0, name: "resourceNames[]", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            }
            try self.terraformSourceNames?.forEach {
                try validate($0, name: "terraformSourceNames[]", parent: name, max: 255)
                try validate($0, name: "terraformSourceNames[]", parent: name, min: 1)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appRegistryAppNames
            case logicalStackNames
            case resourceGroupNames
            case resourceNames
            case terraformSourceNames
        }
    }

    public struct RemoveDraftAppVersionResourceMappingsResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String?
        /// The version of the application.
        public let appVersion: String?

        public init(appArn: String? = nil, appVersion: String? = nil) {
            self.appArn = appArn
            self.appVersion = appVersion
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
        }
    }

    public struct ResiliencyPolicy: AWSDecodableShape {
        /// The timestamp for when the resiliency policy was created.
        public let creationTime: Date?
        /// Specifies a high-level geographical location constraint for where your resilience policy data can be stored.
        public let dataLocationConstraint: DataLocationConstraint?
        /// Specifies the estimated cost tier of the resiliency policy.
        public let estimatedCostTier: EstimatedCostTier?
        /// The resiliency policy.
        public let policy: [DisruptionType: FailurePolicy]?
        /// The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let policyArn: String?
        /// The description for the policy.
        public let policyDescription: String?
        /// The name of the policy
        public let policyName: String?
        /// The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource.
        /// Each tag consists of a key/value pair.
        public let tags: [String: String]?
        /// The tier for this resiliency policy, ranging from the highest severity (MissionCritical) to lowest (NonCritical).
        public let tier: ResiliencyPolicyTier?

        public init(creationTime: Date? = nil, dataLocationConstraint: DataLocationConstraint? = nil, estimatedCostTier: EstimatedCostTier? = nil, policy: [DisruptionType: FailurePolicy]? = nil, policyArn: String? = nil, policyDescription: String? = nil, policyName: String? = nil, tags: [String: String]? = nil, tier: ResiliencyPolicyTier? = nil) {
            self.creationTime = creationTime
            self.dataLocationConstraint = dataLocationConstraint
            self.estimatedCostTier = estimatedCostTier
            self.policy = policy
            self.policyArn = policyArn
            self.policyDescription = policyDescription
            self.policyName = policyName
            self.tags = tags
            self.tier = tier
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime
            case dataLocationConstraint
            case estimatedCostTier
            case policy
            case policyArn
            case policyDescription
            case policyName
            case tags
            case tier
        }
    }

    public struct ResiliencyScore: AWSDecodableShape {
        /// The disruption score for a valid key.
        public let disruptionScore: [DisruptionType: Double]
        /// The outage score for a valid key.
        public let score: Double

        public init(disruptionScore: [DisruptionType: Double], score: Double) {
            self.disruptionScore = disruptionScore
            self.score = score
        }

        private enum CodingKeys: String, CodingKey {
            case disruptionScore
            case score
        }
    }

    public struct ResolveAppVersionResourcesRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String

        public init(appArn: String, appVersion: String) {
            self.appArn = appArn
            self.appVersion = appVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.appVersion, name: "appVersion", parent: name, pattern: "^\\S{1,50}$")
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
        }
    }

    public struct ResolveAppVersionResourcesResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String
        /// The identifier for a specific resolution.
        public let resolutionId: String
        /// The status of the action.
        public let status: ResourceResolutionStatusType

        public init(appArn: String, appVersion: String, resolutionId: String, status: ResourceResolutionStatusType) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.resolutionId = resolutionId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case resolutionId
            case status
        }
    }

    public struct ResourceError: AWSDecodableShape {
        ///  This is the identifier of the resource.
        public let logicalResourceId: String?
        ///  This is the identifier of the physical resource.
        public let physicalResourceId: String?
        ///  This is the error message.
        public let reason: String?

        public init(logicalResourceId: String? = nil, physicalResourceId: String? = nil, reason: String? = nil) {
            self.logicalResourceId = logicalResourceId
            self.physicalResourceId = physicalResourceId
            self.reason = reason
        }

        private enum CodingKeys: String, CodingKey {
            case logicalResourceId
            case physicalResourceId
            case reason
        }
    }

    public struct ResourceErrorsDetails: AWSDecodableShape {
        ///  This indicates if there are more errors not listed in the resourceErrors list.
        public let hasMoreErrors: Bool?
        ///  A list of errors retrieving an application's resources.
        public let resourceErrors: [ResourceError]?

        public init(hasMoreErrors: Bool? = nil, resourceErrors: [ResourceError]? = nil) {
            self.hasMoreErrors = hasMoreErrors
            self.resourceErrors = resourceErrors
        }

        private enum CodingKeys: String, CodingKey {
            case hasMoreErrors
            case resourceErrors
        }
    }

    public struct ResourceMapping: AWSEncodableShape & AWSDecodableShape {
        /// The name of the application this resource is mapped to.
        public let appRegistryAppName: String?
        /// The name of the CloudFormation stack this resource is mapped to.
        public let logicalStackName: String?
        /// Specifies the type of resource mapping.  AppRegistryApp  The resource is mapped to another application. The name of the application is contained in the appRegistryAppName property.  CfnStack  The resource is mapped to a CloudFormation stack. The name of the CloudFormation stack is contained in the logicalStackName property.  Resource  The resource is mapped to another resource. The name of the resource is contained in the resourceName property.  ResourceGroup  The resource is mapped to a resource group. The name of the resource group is contained in the resourceGroupName property.
        public let mappingType: ResourceMappingType
        /// The identifier of this resource.
        public let physicalResourceId: PhysicalResourceId
        /// The name of the resource group this resource is mapped to.
        public let resourceGroupName: String?
        /// The name of the resource this resource is mapped to.
        public let resourceName: String?
        ///  The short name of the Terraform source.
        public let terraformSourceName: String?

        public init(appRegistryAppName: String? = nil, logicalStackName: String? = nil, mappingType: ResourceMappingType, physicalResourceId: PhysicalResourceId, resourceGroupName: String? = nil, resourceName: String? = nil, terraformSourceName: String? = nil) {
            self.appRegistryAppName = appRegistryAppName
            self.logicalStackName = logicalStackName
            self.mappingType = mappingType
            self.physicalResourceId = physicalResourceId
            self.resourceGroupName = resourceGroupName
            self.resourceName = resourceName
            self.terraformSourceName = terraformSourceName
        }

        public func validate(name: String) throws {
            try self.validate(self.appRegistryAppName, name: "appRegistryAppName", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            try self.validate(self.logicalStackName, name: "logicalStackName", parent: name, max: 255)
            try self.validate(self.logicalStackName, name: "logicalStackName", parent: name, min: 1)
            try self.physicalResourceId.validate(name: "\(name).physicalResourceId")
            try self.validate(self.resourceGroupName, name: "resourceGroupName", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            try self.validate(self.resourceName, name: "resourceName", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            try self.validate(self.terraformSourceName, name: "terraformSourceName", parent: name, max: 255)
            try self.validate(self.terraformSourceName, name: "terraformSourceName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case appRegistryAppName
            case logicalStackName
            case mappingType
            case physicalResourceId
            case resourceGroupName
            case resourceName
            case terraformSourceName
        }
    }

    public struct S3Location: AWSDecodableShape {
        /// The name of the Amazon S3 bucket.
        public let bucket: String?
        /// The prefix for the Amazon S3 bucket.
        public let prefix: String?

        public init(bucket: String? = nil, prefix: String? = nil) {
            self.bucket = bucket
            self.prefix = prefix
        }

        private enum CodingKeys: String, CodingKey {
            case bucket
            case prefix
        }
    }

    public struct SopRecommendation: AWSDecodableShape {
        /// The application component name.
        public let appComponentName: String?
        /// The description of the SOP recommendation.
        public let description: String?
        /// The recommendation items.
        public let items: [RecommendationItem]?
        /// The name of the SOP recommendation.
        public let name: String?
        /// The prerequisite for the SOP recommendation.
        public let prerequisite: String?
        /// Identifier for the SOP recommendation.
        public let recommendationId: String
        /// The reference identifier for the SOP recommendation.
        public let referenceId: String
        /// The service type.
        public let serviceType: SopServiceType

        public init(appComponentName: String? = nil, description: String? = nil, items: [RecommendationItem]? = nil, name: String? = nil, prerequisite: String? = nil, recommendationId: String, referenceId: String, serviceType: SopServiceType) {
            self.appComponentName = appComponentName
            self.description = description
            self.items = items
            self.name = name
            self.prerequisite = prerequisite
            self.recommendationId = recommendationId
            self.referenceId = referenceId
            self.serviceType = serviceType
        }

        private enum CodingKeys: String, CodingKey {
            case appComponentName
            case description
            case items
            case name
            case prerequisite
            case recommendationId
            case referenceId
            case serviceType
        }
    }

    public struct StartAppAssessmentRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        /// The version of the application.
        public let appVersion: String
        /// The name for the assessment.
        public let assessmentName: String
        /// Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters.
        /// You should not reuse the same client token for other API requests.
        public let clientToken: String?
        /// The tags assigned to the resource. A tag is a label that you assign to an Amazon Web Services resource.
        /// Each tag consists of a key/value pair.
        public let tags: [String: String]?

        public init(appArn: String, appVersion: String, assessmentName: String, clientToken: String? = StartAppAssessmentRequest.idempotencyToken(), tags: [String: String]? = nil) {
            self.appArn = appArn
            self.appVersion = appVersion
            self.assessmentName = assessmentName
            self.clientToken = clientToken
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.appVersion, name: "appVersion", parent: name, pattern: "^\\S{1,50}$")
            try self.validate(self.assessmentName, name: "assessmentName", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
            try self.validate(self.clientToken, name: "clientToken", parent: name, max: 63)
            try self.validate(self.clientToken, name: "clientToken", parent: name, min: 1)
            try self.validate(self.clientToken, name: "clientToken", parent: name, pattern: "^[A-za-z0-9_.-]{0,63}$")
            try self.tags?.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[^\\x00-\\x1f\\x22]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^[^\\x00-\\x1f\\x22]*$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case appVersion
            case assessmentName
            case clientToken
            case tags
        }
    }

    public struct StartAppAssessmentResponse: AWSDecodableShape {
        /// The assessment created.
        public let assessment: AppAssessment

        public init(assessment: AppAssessment) {
            self.assessment = assessment
        }

        private enum CodingKeys: String, CodingKey {
            case assessment
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn"))
        ]

        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// The tags to assign to the resource. Each tag consists of a key/value pair.
        public let tags: [String: String]

        public init(resourceArn: String, tags: [String: String]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.tags.forEach {
                try validate($0.key, name: "tags.key", parent: name, max: 128)
                try validate($0.key, name: "tags.key", parent: name, min: 1)
                try validate($0.key, name: "tags.key", parent: name, pattern: "^(?!aws:)[^\\x00-\\x1f\\x22]+$")
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, max: 256)
                try validate($0.value, name: "tags[\"\($0.key)\"]", parent: name, pattern: "^[^\\x00-\\x1f\\x22]*$")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case tags
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TerraformSource: AWSEncodableShape & AWSDecodableShape {
        ///  The Terraform s3 state file you need to import.
        public let s3StateFileUrl: String

        public init(s3StateFileUrl: String) {
            self.s3StateFileUrl = s3StateFileUrl
        }

        public func validate(name: String) throws {
            try self.validate(self.s3StateFileUrl, name: "s3StateFileUrl", parent: name, max: 2000)
            try self.validate(self.s3StateFileUrl, name: "s3StateFileUrl", parent: name, pattern: "^((https://([^/]+)\\.s3((-|\\.)[^/]+)?\\.amazonaws\\.com(.cn)?)|(s3://([^/]+)))/\\S{1,2000}$")
        }

        private enum CodingKeys: String, CodingKey {
            case s3StateFileUrl
        }
    }

    public struct TestRecommendation: AWSDecodableShape {
        /// The name of the application component.
        public let appComponentName: String?
        ///  A list of recommended alarms that are used in the test and must be exported before or with the test.
        public let dependsOnAlarms: [String]?
        /// The description for the test recommendation.
        public let description: String?
        /// The intent of the test recommendation.
        public let intent: String?
        /// The test recommendation items.
        public let items: [RecommendationItem]?
        /// The name of the test recommendation.
        public let name: String?
        /// The prerequisite of the test recommendation.
        public let prerequisite: String?
        /// Identifier for the test recommendation.
        public let recommendationId: String?
        /// The reference identifier for the test recommendation.
        public let referenceId: String
        /// The level of risk for this test recommendation.
        public let risk: TestRisk?
        /// The type of test recommendation.
        public let type: TestType?

        public init(appComponentName: String? = nil, dependsOnAlarms: [String]? = nil, description: String? = nil, intent: String? = nil, items: [RecommendationItem]? = nil, name: String? = nil, prerequisite: String? = nil, recommendationId: String? = nil, referenceId: String, risk: TestRisk? = nil, type: TestType? = nil) {
            self.appComponentName = appComponentName
            self.dependsOnAlarms = dependsOnAlarms
            self.description = description
            self.intent = intent
            self.items = items
            self.name = name
            self.prerequisite = prerequisite
            self.recommendationId = recommendationId
            self.referenceId = referenceId
            self.risk = risk
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case appComponentName
            case dependsOnAlarms
            case description
            case intent
            case items
            case name
            case prerequisite
            case recommendationId
            case referenceId
            case risk
            case type
        }
    }

    public struct UnsupportedResource: AWSDecodableShape {
        /// The logical resource identifier for the unsupported resource.
        public let logicalResourceId: LogicalResourceId
        /// The physical resource identifier for the unsupported resource.
        public let physicalResourceId: PhysicalResourceId
        /// The type of resource.
        public let resourceType: String

        public init(logicalResourceId: LogicalResourceId, physicalResourceId: PhysicalResourceId, resourceType: String) {
            self.logicalResourceId = logicalResourceId
            self.physicalResourceId = physicalResourceId
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case logicalResourceId
            case physicalResourceId
            case resourceType
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceArn", location: .uri("resourceArn")),
            AWSMemberEncoding(label: "tagKeys", location: .querystring("tagKeys"))
        ]

        /// The Amazon Resource Name (ARN) of the resource.
        public let resourceArn: String
        /// The keys of the tags to remove.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.resourceArn, name: "resourceArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?!aws:)[^\\x00-\\x1f\\x22]+$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAppRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the application. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let appArn: String
        ///  Assessment execution schedule with 'Daily' or 'Disabled' values.
        public let assessmentSchedule: AppAssessmentScheduleType?
        /// Specifies if the resiliency policy ARN should be cleared.
        public let clearResiliencyPolicyArn: Bool?
        /// The optional description for an app.
        public let description: String?
        /// The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let policyArn: String?

        public init(appArn: String, assessmentSchedule: AppAssessmentScheduleType? = nil, clearResiliencyPolicyArn: Bool? = nil, description: String? = nil, policyArn: String? = nil) {
            self.appArn = appArn
            self.assessmentSchedule = assessmentSchedule
            self.clearResiliencyPolicyArn = clearResiliencyPolicyArn
            self.description = description
            self.policyArn = policyArn
        }

        public func validate(name: String) throws {
            try self.validate(self.appArn, name: "appArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.policyArn, name: "policyArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
        }

        private enum CodingKeys: String, CodingKey {
            case appArn
            case assessmentSchedule
            case clearResiliencyPolicyArn
            case description
            case policyArn
        }
    }

    public struct UpdateAppResponse: AWSDecodableShape {
        /// The specified application, returned as an object with details including compliance status, creation time, description, resiliency score, and more.
        public let app: App

        public init(app: App) {
            self.app = app
        }

        private enum CodingKeys: String, CodingKey {
            case app
        }
    }

    public struct UpdateResiliencyPolicyRequest: AWSEncodableShape {
        /// Specifies a high-level geographical location constraint for where your resilience policy data can be stored.
        public let dataLocationConstraint: DataLocationConstraint?
        /// The type of resiliency policy to be created, including the recovery time objective (RTO) and recovery point objective (RPO) in seconds.
        public let policy: [DisruptionType: FailurePolicy]?
        /// The Amazon Resource Name (ARN) of the resiliency policy. The format for this ARN is:
        /// arn:partition:resiliencehub:region:account:resiliency-policy/policy-id. For more information about ARNs,
        /// see  Amazon Resource Names (ARNs) in the  AWS General Reference.
        public let policyArn: String
        /// The description for the policy.
        public let policyDescription: String?
        /// The name of the policy
        public let policyName: String?
        /// The tier for this resiliency policy, ranging from the highest severity (MissionCritical) to lowest (NonCritical).
        public let tier: ResiliencyPolicyTier?

        public init(dataLocationConstraint: DataLocationConstraint? = nil, policy: [DisruptionType: FailurePolicy]? = nil, policyArn: String, policyDescription: String? = nil, policyName: String? = nil, tier: ResiliencyPolicyTier? = nil) {
            self.dataLocationConstraint = dataLocationConstraint
            self.policy = policy
            self.policyArn = policyArn
            self.policyDescription = policyDescription
            self.policyName = policyName
            self.tier = tier
        }

        public func validate(name: String) throws {
            try self.policy?.forEach {
                try $0.value.validate(name: "\(name).policy[\"\($0.key)\"]")
            }
            try self.validate(self.policyArn, name: "policyArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-iso|aws-iso-[a-z]{1}|aws-us-gov):[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:([a-z]{2}-((iso[a-z]{0,1}-)|(gov-)){0,1}[a-z]+-[0-9]):[0-9]{12}:[A-Za-z0-9/][A-Za-z0-9:_/+=,@.-]{0,1023}$")
            try self.validate(self.policyDescription, name: "policyDescription", parent: name, max: 500)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9_\\-]{1,59}$")
        }

        private enum CodingKeys: String, CodingKey {
            case dataLocationConstraint
            case policy
            case policyArn
            case policyDescription
            case policyName
            case tier
        }
    }

    public struct UpdateResiliencyPolicyResponse: AWSDecodableShape {
        /// The type of resiliency policy that was updated, including the recovery time objective (RTO) and recovery point objective (RPO) in seconds.
        public let policy: ResiliencyPolicy

        public init(policy: ResiliencyPolicy) {
            self.policy = policy
        }

        private enum CodingKeys: String, CodingKey {
            case policy
        }
    }
}

// MARK: - Errors

/// Error enum for Resiliencehub
public struct ResiliencehubErrorType: AWSErrorType {
    enum Code: String {
        case accessDeniedException = "AccessDeniedException"
        case conflictException = "ConflictException"
        case internalServerException = "InternalServerException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceQuotaExceededException = "ServiceQuotaExceededException"
        case throttlingException = "ThrottlingException"
        case validationException = "ValidationException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize Resiliencehub
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// You don&#39;t have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions.
    public static var accessDeniedException: Self { .init(.accessDeniedException) }
    /// Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.
    public static var conflictException: Self { .init(.conflictException) }
    /// This exception occurs when there is an internal failure in the AWS Resilience Hub service.
    public static var internalServerException: Self { .init(.internalServerException) }
    /// The specified resource could not be found.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// You have exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use Service Quotas to request a service quota increase.
    public static var serviceQuotaExceededException: Self { .init(.serviceQuotaExceededException) }
    /// The limit on the number of requests per second was exceeded.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// Indicates that a request was not valid.
    public static var validationException: Self { .init(.validationException) }
}

extension ResiliencehubErrorType: Equatable {
    public static func == (lhs: ResiliencehubErrorType, rhs: ResiliencehubErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension ResiliencehubErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
